<?php defined( '_SYS' ) or die( 'No direct script access allowed' );?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title><?php echo $this->title; ?></title>
<?php echo $this->headData; ?>

</head>
<body>

	<div id="toolbar-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>
		<div class="m">
			<div class="toolbar" id="toolbar">
				<table class="toolbar">
					<tr>
						<td class="button" id="toolbar-save">
							<a href="#" onclick="javascript: submitbutton('saveTranslate')" class="toolbar">
								<span class="icon-32-save" title="Save">
								</span>
							<?php echo C_text::_('Save');?>
							</a>
						</td>
						<!--
						<td class="button" id="toolbar-apply">
							<a href="#" onclick="javascript: submitbutton('applyTranslate')" class="toolbar">
								<span class="icon-32-apply" title="Apply">
								</span>
							<?php //echo C_text::_('Apply');?>
							</a>
						</td>
						-->
						<td class="button" id="toolbar-cancel">
							<a href="#" onclick="javascript: submitbutton('cancel')" class="toolbar">
								<span class="icon-32-cancel" title="Cancel">
								</span>
							<?php echo C_text::_('Cancel');?>
							</a>
						</td>
					</tr>
				</table>
			</div>
			<div class="header icon-48-langmanager"><?php echo C_text::_('ToolBox');?>: <small><small><?php echo $this->subTitle;?></small></small></div>	
			<div class="clr"></div>		
		</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
	</div>
	<div class="clr"></div>
<?php 
	if($this->message) echo $this->message;
?>
<div id="element-box">
		<div class="t">
			<div class="t">
				<div class="t"></div>
			</div>
		</div>	
<div class="m" id="width-100">
	<div class="pane-sliders" id="content-pane">
	<form action="<?php echo WEBSELF; ?>/language" method="post" name="adminForm">
	<?php
	foreach($this->language AS $key=>$val)
	{
	?>
	<div class="panel">
	<h4 id="cpanel-panel-logged" class="title pane-toggler"><a href="#"><span><?php echo $key;?></span></a></h4>
	<div class="pane-slider content">
	<table class="adminlist" cellpadding="1">
		<thead>
			<tr>
				<th width="5" class="title">
					#
				</th>
				<th width="1%" class="title">
					&nbsp;
				</th>
				<th width="35%" nowrap="nowrap">
					<?php echo C_text::_( 'Key'); ?>
				</th>
				<th nowrap="nowrap">
					<?php echo C_text::_( 'Language'); ?>
				</th>
			</tr>
		</thead>
		<tbody>
		<?php
		
			$k = 0;
			$count = 0;
			for ($j=0, $n=count( $val ); $j < $n; $j++)
			{
				$row =& $val[$j];
				if($row->key =="#") 
				{
					echo "<tr class='comment row$k'>";
					echo '<td  colspan="4">'.$row->value.'</td>';
					echo '</tr>';
					continue;
				}
				
			?>
			<tr class="<?php echo "row$k"; ?>">
				<td>
					<?php echo $count+1;?>
				</td>
				<td align="center">
					<?php echo C_html::_('grid.id', $count, $key.'|'.$row->key ); ?>
				</td>
				<td align="center" >
					<?php echo $row->key;?>
				</td>
				<td align="center">
					<input type="text" name="<?php echo 'language'.$key.'['.$row->key.']'; ?>" class="inputbox" size="85" value='<?php echo $row->value; ?>' />
				</td>
			</tr>			
			<?php
				$k = 1 - $k;
				$count++;
				}
			?>
		</tbody>
	</table>
	</div>
	</div>
	<?php
	}
	?>
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="option" value="<?php echo $this->option;?>" />
	<input type="hidden" name="langcode" value="<?php echo $this->lang['lang_code'];?>" />
	<input type="hidden" name="apply" value="<?php echo $this->apply; ?>" />
	<input type="hidden" name="id" value="<?php echo $this->lang['id'];?>" />
	<input type="hidden" name="boxchecked" value="0" />
	<?php echo C_HTML::_( 'form.token' ); ?>
</form>
</div>
</div>
		<div class="b">
			<div class="b">
				<div class="b"></div>
			</div>
		</div>
</div>
<center>
	Powered by <b><a href='http://www.metinfo.cn' target='_blank'>MetInfo</a></b> ©2008- <?php echo date('Y',time());?>&nbsp;<a href='http://www.metinfo.cn' target='_blank'>www.MetInfo.cn</a>
</center>
<?php echo $this->js; ?>
</body>
</html>